package com.example.order_system.service;

import cn.hutool.crypto.SecureUtil;
import com.example.order_system.mapper.UserMapper;
import com.example.order_system.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: UserService
 * @author: chengbaiyi
 * @create: 2022-07-22 14:23
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int reg(String username, String password) {
        return userMapper.reg(username, password);
    }

    public int existed(String username) {
        return userMapper.existed(username);
    }

    public UserInfo login(String username, String isadmin) {
        return userMapper.login(username, isadmin);
    }
}
